package com.nondo.dean.platform.mapper;

import com.nondo.dean.common.mybatis.Table;
import com.nondo.dean.platform.domain.SystemArticle;
import com.nondo.dean.platform.domain.SystemArticleExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

@Table("system_article")
@Mapper
public interface SystemArticleMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @SelectProvider(type=SystemArticleSqlProvider.class, method="countByExample")
    long countByExample(SystemArticleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @DeleteProvider(type=SystemArticleSqlProvider.class, method="deleteByExample")
    int deleteByExample(SystemArticleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Delete({
        "delete from system_article",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Insert({
        "insert into system_article (id, type, ",
        "title, create_by, ",
        "create_date, update_by, ",
        "update_date, remarks, ",
        "del_flag, body)",
        "values (#{id,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, ",
        "#{title,jdbcType=VARCHAR}, #{createBy,jdbcType=BIGINT}, ",
        "#{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT}, ",
        "#{updateDate,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ",
        "#{delFlag,jdbcType=CHAR}, #{body,jdbcType=LONGVARCHAR})"
    })
    int insert(SystemArticle record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @InsertProvider(type=SystemArticleSqlProvider.class, method="insertSelective")
    int insertSelective(SystemArticle record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @SelectProvider(type=SystemArticleSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<SystemArticle> selectByExampleWithBLOBsWithRowbounds(SystemArticleExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @SelectProvider(type=SystemArticleSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<SystemArticle> selectByExampleWithBLOBs(SystemArticleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @SelectProvider(type=SystemArticleSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<SystemArticle> selectByExampleWithRowbounds(SystemArticleExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @SelectProvider(type=SystemArticleSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<SystemArticle> selectByExample(SystemArticleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Select({
        "select",
        "id, type, title, create_by, create_date, update_by, update_date, remarks, del_flag, ",
        "body",
        "from system_article",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.LONGVARCHAR)
    })
    SystemArticle selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @UpdateProvider(type=SystemArticleSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") SystemArticle record, @Param("example") SystemArticleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @UpdateProvider(type=SystemArticleSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") SystemArticle record, @Param("example") SystemArticleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @UpdateProvider(type=SystemArticleSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") SystemArticle record, @Param("example") SystemArticleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @UpdateProvider(type=SystemArticleSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(SystemArticle record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Update({
        "update system_article",
        "set type = #{type,jdbcType=VARCHAR},",
          "title = #{title,jdbcType=VARCHAR},",
          "create_by = #{createBy,jdbcType=BIGINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_by = #{updateBy,jdbcType=BIGINT},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP},",
          "remarks = #{remarks,jdbcType=VARCHAR},",
          "del_flag = #{delFlag,jdbcType=CHAR},",
          "body = #{body,jdbcType=LONGVARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(SystemArticle record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table system_article
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Update({
        "update system_article",
        "set type = #{type,jdbcType=VARCHAR},",
          "title = #{title,jdbcType=VARCHAR},",
          "create_by = #{createBy,jdbcType=BIGINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_by = #{updateBy,jdbcType=BIGINT},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP},",
          "remarks = #{remarks,jdbcType=VARCHAR},",
          "del_flag = #{delFlag,jdbcType=CHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(SystemArticle record);
}